package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_COMPANY_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_COMPARISON_OPERATOR;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_CONDITION;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_FORMULA_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_PROPERTY_NAME;
import static org.jsola.hr.example.SalaryFormulaConditionExample.E_SALARY_PLAN_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_COMPARISON_OPERATOR_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_CONDITION_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_FORMULA_ID_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_PROPERTY_NAME_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.M_SALARY_PLAN_ID_MAX;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_COMPANY_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_COMPARISON_OPERATOR;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_CONDITION;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_FORMULA_ID;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_PROPERTY_NAME;
import static org.jsola.hr.example.SalaryFormulaConditionExample.N_SALARY_PLAN_ID;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【工资方案公式条件】的参数")
@Data
public class SalaryFormulaConditionUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_SALARY_PLAN_ID, example = E_SALARY_PLAN_ID)
    @Length(max = 32, message = M_SALARY_PLAN_ID_MAX)
    private String salaryPlanId;

    @ApiModelProperty(notes = N_FORMULA_ID, example = E_FORMULA_ID)
    @Length(max = 32, message = M_FORMULA_ID_MAX)
    private String formulaId;

    @ApiModelProperty(notes = N_PROPERTY_NAME, example = E_PROPERTY_NAME)
    @Length(max = 255, message = M_PROPERTY_NAME_MAX)
    private String propertyName;

    @ApiModelProperty(notes = N_COMPARISON_OPERATOR, example = E_COMPARISON_OPERATOR)
    @Length(max = 255, message = M_COMPARISON_OPERATOR_MAX)
    private String comparisonOperator;

    @ApiModelProperty(notes = N_CONDITION, example = E_CONDITION)
    @Length(max = 11, message = M_CONDITION_MAX)
    private String condition;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

